package com.lianzhihui.romeex.mvp.presenter;

import android.content.Context;

import com.lianzhihui.romeex.bean.MyTeamBean;
import com.lianzhihui.romeex.bean.OrePoolBean;
import com.lianzhihui.romeex.mvp.model.MyTeamModelImp;
import com.lianzhihui.romeex.mvp.model.MyTeamModelInterface;
import com.lianzhihui.romeex.mvp.model.OrePoolFragmentModelImp;
import com.lianzhihui.romeex.mvp.model.OrePoolFragmentModelInterface;
import com.lianzhihui.romeex.mvp.view.MyTeamView;
import com.lianzhihui.romeex.mvp.view.OrePoolFragmentView;

//逻辑实现
public class OrePoolFragmentPresnterImp implements OrePoolFragmentModelInterface {

    private final OrePoolFragmentView viewLayer;
    private final OrePoolFragmentModelImp modelImp;

    public OrePoolFragmentPresnterImp(Context context, OrePoolFragmentView viewLayer) {
        this.viewLayer = viewLayer;
        modelImp = new OrePoolFragmentModelImp(context, this);
    }

    public void requestRollingPoolIndex() {
        modelImp.requestRollingPoolIndex();
    }


    @Override
    public void onFailure() {
        viewLayer.setFailure();
    }

    @Override
    public void responseRollingPoolIndexSuccess(OrePoolBean bean) {
        viewLayer.responseRollingPoolIndexSuccess(bean);
    }
}
